package huanzhao.erp.mapper;

import huanzhao.erp.domain.entity.FinanceSettlement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import huanzhao.erp.domain.types.FinanceSettlementType;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;


public interface FinanceSettlementMapper extends BaseMapper<FinanceSettlement> {
    /**
     * 撤销结算
     *
     * @param phoneId 手机id
     * @param type    结算类型
     * @return boolean 是否撤销成功
     * 2024/10/13 19:38:14
     */
    boolean revoke(@Param("phoneId") Long phoneId, @Param("type") FinanceSettlementType type);

    /**
     * 完成结算
     *
     * @param settlementId 结算id
     * @param price        修改的结算金额
     * @param comment      结算描述
     * @return boolean
     * 2024/10/14 12:08:59
     */
    boolean finishSettlement(@Param("settlementId") long settlementId, @Param("price") BigDecimal price, @Param("comment") String comment);
}




